﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.Runtime.InteropServices;

namespace NetHelperDebugger
{
    public partial class SeedViewer : Form
    {
        public SeedViewer()
        {
            InitializeComponent();
        }

        //[DllImport("CBSeedHex.dll")]
        //public static extern int CBSeed_GetEncodeHex_BufferSize(int nLength);
        //public static extern int CBSeed_GetDecodeHex_BufferSize(int nLength);

        //public static extern int CBSeed_EncodeBlock_Hex(byte[] pbData,
        //                                                int nBlockLength,
        //                                                int nMaxLength,
        //                                                ref int nOutEncLength);


         private void buttonEncrypt_Click(object sender, EventArgs e)
        {

            //string str0 = "Test : String";
            //byte[] bStrByte = Encoding.UTF8.GetBytes(str0);   // string -> byte

            //string str1 = Encoding.Default.GetString(bStrByte);   // byte -> string
            //Debug.WriteLine(str1);

            //string sEncrypt;
            //string sDecrypt = textBoxDecrypt.Text;

            //if (sDecrypt.Length < 1)
            //    return;

            //byte[] bSDecrypt = Encoding.UTF8.GetBytes(sDecrypt);
            ////IntPtr pSDecrypt = Marshal.StringToHGlobalAnsi(sDecrypt);

            //int nOutEncLength = 0;
            //int nLength = bSDecrypt.Length;
            //int nEncodeLength = CBSeed_GetEncodeHex_BufferSize(nLength);

            //byte[] bSEncrypt = new byte[nEncodeLength + 16];

            //CBSeed_EncodeBlock_Hex(bSEncrypt, nLength, nEncodeLength, ref nOutEncLength);


            //sEncrypt = Encoding.Default.GetString(bSDecrypt);
        }

        private void buttonDecrypt_Click(object sender, EventArgs e)
        {

        }
    }
}
